﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Billing.Windows
{
    public partial class BulkOrderMain : Window
    {
        public BulkOrderMain()
        {
            InitializeComponent();
        }

        private void Window_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.Key == Key.G)
                {
                    BulkOrderBillingGrid bc = new BulkOrderBillingGrid();
                    bc.Owner = this;
                    bc.ShowDialog();
                }
                else if (e.Key == Key.M)
                {
                    DeliverBulkOrder deliver = new DeliverBulkOrder();
                    deliver.Owner = this;
                    deliver.ShowDialog();
                }
                else if (e.Key == Key.S)
                {
                    SearchBulkOrders search = new SearchBulkOrders();
                    search.Owner = this;
                    search.ShowDialog();
                }
                else if (e.Key == Key.C)
                {
                    CancelBulkOrder cancel = new CancelBulkOrder();
                    cancel.Owner = this;
                    cancel.ShowDialog();
                }
                else if (e.Key == Key.B)
                {
                    BulkOrderBoxBillingGrid bc = new BulkOrderBoxBillingGrid();
                    bc.Owner = this;
                    bc.ShowDialog();
                }
                else if (e.Key == Key.Escape)
                {
                    this.Close();
                }
            }
            catch (Exception) { }
        }
    }
}
